package com.xing.mybatis;

import com.xing.mybatis.entity.AssetMetaEntity;

public class AssetMetaSqlBuilder extends GeneralSqlBuilder {

    public static final String TABLE_NAME = "wa_asset_meta";
    public static final String KEY_PROP = "id";

    public String insert(AssetMetaEntity row) {
        return buildSimpleInsert(row, TABLE_NAME, KEY_PROP);
    }

    public static void main(String[] args) {
        AssetMetaEntity row = new AssetMetaEntity(1, 2);
        row.setId(1l);

//        System.out.println(buildSimpleInsert(row, TABLE_NAME, KEY_PROP));

        String property = "AssertId";
        property = property.replaceAll("([A-Z])", "_$1").toLowerCase();
        property = property.replaceAll("^_", "");
        System.err.println(property);


        System.err.println(buildSimplePatch(row, TABLE_NAME, KEY_PROP));
    }

}
